<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let jsonobj = { "students": [{ name: "wyb", age: '24', sex: 'boy' }, { name: "zyx", age: '27', sex: 'boy' }] }
        localStorage.setItem("jsonobj", JSON.stringify(jsonobj))
        let arr = [{ name: 'you', score: '98', sex: 'girl' }, { name: 'me', score: '99', sex: 'boy' }]
        localStorage.setItem("arr", JSON.stringify(arr))
        let str = '{"name":"heheheh"}'
        let str2 = '{"age":23}'
        localStorage.setItem("age", 23)
        let age = localStorage.getItem('age')
        let getJsonObj =  JSON.parse( localStorage.getItem('jsonobj'))
       
        console.log('getJsonObj', getJsonObj)
        localStorage.setItem("name", 'hehhee')
        // localStorage.clear()
        localStorage.removeItem("jsonobj")
        localStorage.removeItem("arr")
        localStorage.removeItem("age")
        localStorage.removeItem("name")
    </script>
</body>

</html>